package com.wzqj.agent.web.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wzqj.agent.web.dao.RolePrivilegeDao;
import com.wzqj.agent.web.domain.RolePrivilege;
import com.wzqj.agent.web.service.RolePrivilegeService;
/**
 * 角色权限业务实现层
 * @author gz
 *
 */
@Service("rolePrivilegeService")
public class RolePrivilegeServiceImpl implements RolePrivilegeService {

	@Autowired
	private RolePrivilegeDao rolePrivilegeDao;
	@Override
	public int insert(RolePrivilege rolePrivilege) {
		rolePrivilegeDao.insert(rolePrivilege);
		return rolePrivilege.getId();
	}

	@Override
	public int delete(Integer id) {
		rolePrivilegeDao.delete(id);
		return id;
	}

	@Override
	public int update(RolePrivilege rolePrivilege) {
		rolePrivilegeDao.update(rolePrivilege);
		return rolePrivilege.getId();
	}

	@Override
	public RolePrivilege getById(Integer id) {
		return rolePrivilegeDao.getById(id);
	}

}
